-
Notifications
You must be signed in to change notification settings - Fork 530
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Zora's River waterfall always open, take two #4459
Zora's River waterfall always open, take two #4459
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have two points of feedback but otherwise looks good:
- Use
CHECK_QUEST_ITEM(QUEST_SONG_LULLABY)
instead ofFlags_Get
- The way you have it now, setting up the OnActorUpdate is entirely unnecessary, and doesn't really do anything. If your intent was to handle the case where the player enters the scene, then after they have entered the scene became eligible, you should move the eligibility condition to within the actor update. If you only want to check if they are eligible on ActorInit you can remove the OnActorUpdate usage
Oh, I realize now malk pointed out that you had duplicated this condition both in and out of the OnActorUpdate, looks like you just removed the wrong one |
Is there a more efficient way to check that Link has an ocarina? Even if it's just a macro? I wanted to write a |
Technically you could do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Honestly, I'm not sure how the enhancement should interact with the rando setting, since it always affects logic, but my instinct is to say that it should follow the blue fire and sunlight arrows precedents and be disabled if the rando setting is anything but closed. But that also depends on whether having "open as adult" as an option makes sense. What was the reasoning for having that as an option for the rando setting?
soh/soh/Enhancements/randomizer/3drando/location_access/locacc_zoras_domain.cpp
Outdated
Show resolved
Hide resolved
I don't think there was really any logic to it, I just wanted a third option. 😅 I did just have an idea of adding a third option where instead of never having to play ZL, you only have to play it once and then the waterfall stays open for the rest of the game (like the door to Darunia's room). I think that'd be more suitable for the enhancement, though. I also see your point about having one setting override the other. |
Play one time would definitely make more sense than just arbitrarily having it open as adult but not as child. That would also make sense to be able to add to the enhancement, and it wouldn't have to be accounted for in logic, I don't think. |
I had a think and, fundamentally, if it's closed at all you need to play the song to open it, even if only once. So I think there's no point in having that be an option for the rando setting. I thought of doing it for the enhancement, but that would require adding a permanent flag to set when it's opened; the one that gets set in VB is a temporary one. |
When we get OI as a trick, the ZL check will want to use Here to check for either age access, as OI can lock ocarina use by age if the player has limited items to OI with (and put away OI is off). That being said, when we do this, I would insist on play once mode. This is because it's possible to cause key logic edge cases with backflip OI and sticks, and bomb OI in general, giving you temporary access to a dungeon and I want to make a point of stamping all of those out. This is a minor issue though and not one worth making a whole setting for like having it always open would be. |
What's OI? |
Ocarina Items, a glitch that allows you to play an item that is not an ocarina, as an ocarina. |
Worth noting that it doesn't apply to every item. |
Ooh, you know what - I just discovered that there is, in fact, a permanent flag for opening Zora's Domain for the first time. It's an event flag. Tomorrow I will mod the enhancement to add the "play only once" option. |
I think that flag might just be for cutscene or something, so the first time cs doesn't play every time you open it. |
The owl doesn't appear at the beginning of Zora's River if the flag is set. |
OK, done. I also decided to remove the owl if it's set to never play ZL, because him telling you to play it would be incorrect. |
Maybe we should plug the owl removal from this into the existing cutscene skip for the owl instead of just killing where you have it? I'm not sure how that would fit in the design plan for time savers and hooks, though. |
My vision with removing the owl was that the "Never play" option would work like the "Play once" option does after the waterfall is opened once, and that would include the owl being gone. |
So that removal only runs on never play? |
Correct. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had a quick poke, seems to work on the surface, however I would prefer the setting be handled differently in randomiser:
- The setting should be greyed out and uneditable, with the hover text explaining that waterfall is forced open if it is open, or forced to Once for logic reasons if it is closed.
- If the waterfall is closed, it should actually force Once mode instead of Never. This is to cover a logical edge case with dungeon ER when we start working with glitch logic. Specifically, OI with sticks without a stick source can cause link to get into a dungeon (usually spirit temple) once as child, use keys badly to lock adult out, waste the sticks, and then be unable to go back in there to fix the mistake.
@@ -43,7 +43,7 @@ void RegionTable_Init_ZorasDomain() { | |||
Entrance(RR_ZR_FAIRY_GROTTO, {[]{return Here(RR_ZORAS_RIVER, []{return logic->BlastOrSmash();});}}), | |||
Entrance(RR_THE_LOST_WOODS, {[]{return logic->HasItem(RG_SILVER_SCALE) || logic->CanUse(RG_IRON_BOOTS);}}), | |||
Entrance(RR_ZR_STORMS_GROTTO, {[]{return logic->CanOpenStormsGrotto();}}), | |||
Entrance(RR_ZR_BEHIND_WATERFALL, {[]{return logic->CanUse(RG_ZELDAS_LULLABY) || (logic->IsChild && ctx->GetTrickOption(RT_ZR_CUCCO)) || (logic->IsAdult && logic->CanUse(RG_HOVER_BOOTS) && ctx->GetTrickOption(RT_ZR_HOVERS));}}), | |||
Entrance(RR_ZR_BEHIND_WATERFALL, {[]{return ctx->GetOption(RSK_SLEEPING_WATERFALL).Is(RO_WATERFALL_OPEN) || logic->CanUse(RG_ZELDAS_LULLABY) || (logic->IsChild && ctx->GetTrickOption(RT_ZR_CUCCO)) || (logic->IsAdult && logic->CanUse(RG_HOVER_BOOTS) && ctx->GetTrickOption(RT_ZR_HOVERS));}}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In line with my push to use Once instead of Never for the waterfall when it's closed, the logic here should say Here(RR_ZORAS_RIVER, []{return ctx->GetOption(RSK_SLEEPING_WATERFALL).Is(RO_WATERFALL_OPEN);}) ||
So that, when OI is implemented, this logic works properly with it and age specific OI items as with once 1 age should be able to open the way for the other.
I need some help understanding your request. Here's what I think you're asking for:
|
That is correct. |
Hey, sorry to come in with this after you went through the effort to follow Pepper0ni's directions, but we're not ready to implement the underlying principle behind the idea of forcing "play only once" despite the logic setting being basically off, so could I get you to only force the enhancement when the logic setting is "open"? Should be good to merge after that. So, the functionality should be:
Again, following the blue fire arrows pattern. |
By this I assume you mean forced to the "Never play" option? |
Yes. |
Oops, I think I know why. I removed the rando part of the hook, thinking it'd be enough to lean on the forced enhancement setting, which is still conditioned upon being at least able to play ZL. I forgot that that misses the point of having it open in rando. My bad. |
Will give it a final test when conflicts are resolved |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a little unusual to me that Never is overridden on close waterfall but the option is still selectable, but given what me and malk have put you through I think that it's best to just let this in for now and for the more senior devs to talk through what to do about OI logic edge cases later.
I did have 1 note about the logic as a result of our indecisiveness, but it won't actually cause issues if merged do am willing to approve regardless, especially as it's not your fault but a managerial disagreement.
Entrance(RR_ZR_BEHIND_WATERFALL, {[]{ | ||
return Here(RR_ZORAS_RIVER, []{return ctx->GetOption(RSK_SLEEPING_WATERFALL).Is(RO_WATERFALL_OPEN);}) || | ||
logic->CanUse(RG_ZELDAS_LULLABY) || | ||
(logic->IsChild && ctx->GetTrickOption(RT_ZR_CUCCO)) || | ||
(logic->IsAdult && logic->CanUse(RG_HOVER_BOOTS) && ctx->GetTrickOption(RT_ZR_HOVERS)); | ||
}}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I got overruled on the waterfall lock the Here isn't needed anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep it, I say. When you guys return to the OI well, you'll need it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, if it's not going to cause issues to leave it in, I would normally see no reason to get rid of it when we'll need it later, but it should probably be commented with a note about why it'll be needed later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sure it's labelled with a TODO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I have a dumb question for @Pepper0ni. Why was the Here check needed in the first place? OI would ostensibly only apply if the waterfall is Closed (forcing Once for the enhancement), but the condition is that the rando setting for the waterfall is Open (forcing Never).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What should be happening (there seems to be a bug that you pointed out) is that if Once is forced, opening the waterfall as one age would open it as the other. Here to it's own location is a hacky way to check if you can do something as any age (making this less obtuse is on my todo list), so it would check if it was possible to open the waterfall as 1 age to let the other in.
This only matters with OI as both ages can use the ocarina if they have on, but it's possible for you to only have an age-locked item to OI with.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I wrapped the wrong part of the condition in Here. It should have been Here(RR_ZORAS_RIVER, []{return logic->CanUse(RG_ZELDAS_LULLABY);})
because you originally said that the ZL check should be what allows either age access. That's what's important to OI when Once is forced.
The point is that only the open rando setting would override the enhancement there, otherwise it would be up to the player whether to change it or not, so unless you see something in the code that says it's overriding anything when the closed rando option is selected, I believe that's how it should be. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, only small thing is it seems to take a few seconds to apply the open waterfall setting when I spawn in near the waterfall, but it's a tiny polish thing I will not block this over.
Second attempt at adding the enhancement. This time, it is handled entirely by VB hooks, and it requires that Link has an ocarina (either one will do) and has learnt Zelda's Lullaby.
Also, TIL the waterfall is called Sleeping Waterfall. 😆
Also added a randomizer setting to keep it open.
Build Artifacts